package com.lwh.easyexcel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * @author lwh
 * @date 2021/5/20 10:34
 */
public class ExcelListener extends AnalysisEventListener<Test> {

    //一行一行读取（从第二行开始）
    @Override
    public void invoke(Test test, AnalysisContext analysisContext) {
        System.out.println(test);
    }

    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头信息"+headMap);
    }

    //读取后执行
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
